package com.dmall.mapper;

import com.dmall.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 用户管理Mapper类
 * @author xiao1.wang
 * @date 2019-06-25 13:23:26
 */
public interface UserMapper {

    /**
     * 查询用户列表
     * @return List<User>
     */
    @Select("select * from dmall_user")
    List<User> list();

    @Insert("insert into dmall_user(login_name, password, real_name, gender, birth, `desc`) values (#{loginName}, #{password}, #{realName}, #{gender}, #{birth}, #{desc})")
    void insertUser(User user);
}
